package csel.view;

import junit.framework.TestCase;
import org.junit.*;
import csel.model.*;

import javax.swing.JOptionPane;

public class ViewportTester extends TestCase
{
	Viewport view;
	
	public ViewportTester()
	{
		view = new AreaViewport(new Model());
	}
	
	@Test
	public void testDisplayConfirmYes()
	{
		boolean ret;
		
		ret = view.displayConfirm("Please click yes.");
		
		assertTrue(ret);
	}
	
	@Test
	public void testDisplayConfirmNo()
	{
		boolean ret;
		
		ret = view.displayConfirm("Please click no.");
		
		assertFalse(ret);
	}
	
	@Test
	public void testPromptOpenDialog()
	{
		String filename;
		
		filename = view.promptOpenDialog();
		
		assertTrue(filename != null);
	}
	
	@Test
	public void testPromptSaveDialog()
	{
		String filename;
		
		filename = view.promptSaveDialog();
		
		assertTrue(filename != null);
	}
}
